import { IService } from "./IService";

export class Proxy implements IService {
    private service: IService;
    constructor(service: IService) {
        this.service = service;
    }
    private check() {
        return true
    }
    operation() {
        console.log('proxy operation')
        if (this.check()) {
            this.service.operation()
        }
    }
}